﻿#include <iostream>
using namespace std;

class Overload {
public:
    void func(int i) {
        cout << "Function with int: " << i << endl;
    }

    void func(double d) {
        cout << "Function with double: " << d << endl;
    }

    void func(int i, double d) {
        cout << "Function with int and double: " << i << ", " << d << endl;
    }
};

int main() {
    Overload obj;
    obj.func(10);         // 调用 func(int)
    obj.func(3.14);      // 调用 func(double)
    obj.func(10, 3.14); // 调用 func(int, double)
    return 0;
}